﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using Informant.UI.Credentials;


namespace Informant.UI.Wpf
{
	[RunInstaller(true)]
	public partial class ProjectInstaller : Installer
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="ProjectInstaller"/> class.
		/// </summary>
		public ProjectInstaller()
		{
			InitializeComponent();
		}

		/// <summary>
		/// Raises the <see cref="E:System.Configuration.Install.Installer.AfterUninstall"/> event.
		/// </summary>
		/// <param name="savedState">An <see cref="T:System.Collections.IDictionary"/> that contains the state of the computer after all the installers contained in the <see cref="P:System.Configuration.Install.Installer.Installers"/> property are uninstalled.</param>
		protected override void OnAfterUninstall(IDictionary savedState)
		{
			//System.Diagnostics.Debugger.Launch();
			CredentialsHelper.RemoveAnySavedCredsFromStorage();
			base.OnAfterUninstall(savedState);
		}
	}
}
